import Vue from 'vue'
import VueRouter from 'vue-router'
import Yi from '../views/yi.vue'
import Era from "@/views/er/era.vue"
import Erc from "@/views/er/erc.vue"
import Erb from "@/views/er/erb.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: '/yi',
    name: 'yi',
    component: Yi,
    children:[
      // {
      //   path: '/era',
      //   name: 'era',
      //   component: Era
      // },
      // {
      //   path: '/erb',
      //   name: 'erb',
      //   component:Erb
      // },
      // {
      //   path: '/erc',
      //   name: 'erc',
      //   component:Erc
      // },
      {
        path: 'era',
        name: 'era',
        component: Era
      },
      {
        path: 'erb',
        name: 'erb',
        component:Erb
      },
      {
        path: 'erc',
        name: 'erc',
        component:Erc
      },
    ]
  },
  {
    path: '/index',
    name: 'index',
    component: () => import('../views/index.vue')
  },
  {
    path: '/xiangqing/:id',
    name: 'xiangqing',
    component: () => import('../views/xiangqing.vue')
  },
  {
    path: '/topic',
    name: 'topic',
    component: () => import('../views/topic.vue')
  },
  {
    path: '/denglu',
    name: 'denglu',
    component: () => import('../views/denglu.vue')
  },
  {
    path: '/zhuce',
    name: 'zhuce',
    component: () => import('../views/zhuce.vue')
  },
  {
    path: '/shop',
    name: 'Shop',
    component: () => import('../views/shop.vue')
  },
  {
    path: '/hotstop',
    name: 'hotstop',
    component: () => import('../views/hotstop.vue')
  },
  {
    path: '/quan',
    name: 'quan',
    component: () => import('../views/quan.vue')
  },
  {
    path: '/active',
    name: 'active',
    component: () => import('../views/active.vue')
  },
  {
    path: '/myself',
    name: 'myself',
    component: () => import('../views/myself.vue')
  },
 
  {
    path: '/zhipian',
    name: 'zhipian',
    component: () => import('../views/zhipian.vue')
  },
  {
    path: '/spot',
    name: 'spot',
    component: () => import('../views/spot.vue')
  },
  {
    path: '/beaty',
    name: 'beaty',
    component: () => import('../views/beaty.vue')
  },
  {
    path: "/",
    redirect: "/index"
  },
  {
    path: '*',
    name: 'err',
    component: () => import('../views/err.vue')
  },
]

const router = new VueRouter({

  base: process.env.BASE_URL,
  routes
})

export default router